import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import render from '@dfeidao/atom-mobile/render/render';
import get_storage from '@dfeidao/atom-mobile/storage/get';
import set_storage from '@dfeidao/atom-mobile/storage/set';

interface Iarr {
	id: number;
	text: string;
	show: boolean;
}
export default async function a005(fd: IFeidaoAiMobile, option: Iarr) {
	const arr = JSON.parse(await get_storage('arr')) as Iarr[];
	const new_arr = arr.filter((item) => {
		return item.id !== option.id;
	});
	set_storage('arr', JSON.stringify(new_arr));
	render(fd, { arr: new_arr, fd });
}
